<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
</head>
<link type="text/css" rel="stylesheet"  href="static/css/goods.css"/>

<body>
<c:if test="${empty(sessionScope.user)}"><a href="user?action=login">登录</a></c:if><!-- 如果为用户为空显示登录 -->
	<c:if test="${!empty(sessionScope.user) }">${user.uname}</c:if><!-- 不为空显示用户名 -->
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="user?action=logout">注销</a>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="cart">查看</a>
<script type="text/javascript">
function changeImg(x) {
	//当前节点的父节点的父节点第一个子节点的第一个子节点
	x.parentNode.parentNode.children[0].children[0].src=x.src;
}
</script>
<div id="outer">
		<div id="lay1">
				<div class="t1">小米商城&nbsp;&nbsp;||&nbsp;</div>
				<div class="t2">&nbsp;小米商城移动版&nbsp;||&nbsp;</div>
				<div class="t2">&nbsp;问题反馈</div>
				<div class="bu">
					<div class="t">购物车</div>
				</div>
				<div class="t3">&nbsp;消息通知</div>
				<div class="t4">登录&nbsp;&nbsp;||&nbsp;</div>
				<div class="t4">&nbsp;注册&nbsp;||&nbsp;</div>
			</div>
		<div id="lay3">小米商城/手机/手机</div>
		<div id="lay2">
			<div class="left">
				<div class="pic">
				<img src="${goods.pic }"></div>
				<div class="p1">
				<img src="${goods.pic1 }" onmouseover="changeImg(this)" ></div>
				<div class="p2"><img src="${goods.pic2 }" onmouseover="changeImg(this)" ></div>
				<div class="p2"><img src="${goods.pic3 }" onmouseover="changeImg(this)" ></div>
				<div class="p2"><img src="${goods.pic4 }" onmouseover="changeImg(this)" ></div>
			</div>
			<div class="rigth">
			<c:choose>
					<c:when test="${in=='computer'}">
						<%@include file="computer.jsp"%>
					</c:when>
					<c:otherwise>
						<%@include file="phone.jsp"%>
					</c:otherwise>
				</c:choose>

			</div>
		</div>
		</div>
</body>
</html>